perm filename MIDSOL.PUB[206,LSP] blob sn#132899 filedate 1974-11-21 generic text, type T, neo UTF8
.REQUIRE "SETUP2" SOURCE_FILE;
.BEGIN NOFILL
.VARIABLE CHW
.CHW ← CHARW
.TURN OFF "βα#\←∞↑↓∪"
.TURN ON "∂{%"
.TURN ON "/" FOR "α"
.AT "∂∂(" CH ")" ⊂ CHARW←CH}∂(2){CHARW←CHW ⊃
.TURN ON "←"
←CS206		 SOLUTIONS TO MIDTERM		FALL 1974
.TURN OFF "←"







∂∂(48)%3gett%2[%3y%2, %3p%2]%2 %2← %4if%2 %4n %3p%2 %4then%2 %3y%2 %4else if%2 %4a %3p%2 %4eq %5A%2 %4then%2 %3gett%2[%4a %3y%2, %4d %3p%2]%2 %4else%2 %3gett%2[%4d %3y%2, %4d %3p%2]



∂∂(48)%3point%2[%3x%2, %3y%2]%2 %2← 
∂∂(80)%4if%2 %3equal%2[%3x%2, %3y%2]%2 %4then%2 %5NIL
∂∂(80)%4else if%2 %4at %3y%2 %4then%2 %5FAIL
∂∂(80)%4else%2 %2/{%3point%2[%3x%2, %4a %3y%2]%2}%2[λ%3u%2. 
∂∂(112)%4if%2 %3u%2 %4eq %5FAIL%2 %4then%2 %2/{%3point%2[%3x%2, %4d %3y%2]%2}%2[λ%3v%2. %4if%2 %3v%2 %4eq %5FAIL%2 %4then%2 %5FAIL%2 %4else%2 %5D%2 %2. %3v%2]%2 %4else%2 %5A%2 %2. %3u%2]



∂∂(48)%3allpoint%2[%3x%2, %3y%2]%2 %2← 
∂∂(80)%4if%2 %3equal%2[%3x%2, %3y%2]%2 %4then%2 %2(%5NIL%2)
∂∂(80)%4else if%2 %4at %3y%2 %4then%2 %5NIL
∂∂(80)%4else%2 %3mapcar%2[%2[λ%3w%2. %5A%2 %2. %3w%2]%2, %3allpoint%2[%3x%2, %4a %3y%2]%2]%2 %2* %3mapcar%2[%2[λ%3w%2. %5D%2 %2. %3w%2]%2, %3allpoint%2[%3x%2, %4d %3y%2]%2]



∂∂(48)%3transpose%2 %3u%2 %2← %4if%2 %4n %4a %3u%2 %4then%2 %5NIL%2 %4else%2 %3mapcar%2[%3car%2, %3u%2]%2 %2. %3transpose%2 %3mapcar%2[%3cdr%2, %3u%2]



∂∂(48)%3power%2 %3u%2 %2← %4if%2 %4n %3u%2 %4then%2 %2(%5NIL%2)%2 %4else%2 %2/{%3power%2 %4d %3u%2}%2[λ%3w%2. %3w%2 %2* %3mapcar%2[%2[λ%3x%2. %4a %3u%2 %2. %3x%2]%2, %3w%2]%2]

.END